import { _decorator, Component, director, Node } from 'cc';
import { Core } from '../core/Core';
const { ccclass, property } = _decorator;

@ccclass('Start')
export class Start extends Component {
    start() {
        Core.instance.init(() => {
            director.preloadScene("Main", (completeCount: number, totalCount: number, item: any) => {
                if (totalCount > 0) {
                    console.log('加载进度', completeCount / totalCount);
                }
            }, () => {
                director.loadScene("Main");
            })
        })
    }

    update(deltaTime: number) {

    }
}


